#ifndef ROBOT_H
#define ROBOT_H

#include <QPoint>
#include "connection.h"
#include <math.h>
#include <iostream>

class Robot
{
    QPoint position;
    double vWheel[4];
    bool spin;
    double orientation;
    double kickX;
    double kickZ;
    connection* connect;
    int id;

public:
    Robot();
    Robot(connection& connect, QPoint pos = QPoint(), double Orient = 0.0,  int id = 0);
    ~Robot(){}
public:
    QPoint getPosition();
    double getVelocityWheel(int wheel);
    double getOrientation();
    void setPosition(QPoint pos);
    void setOrientation(double orientation);
    void velocityTransformation(double vx, double vy, double w);
    void sendConditions();

//Actions
    void followTheBall(QPoint ball);
    void shoot(double vX, double vZ=0.0);
    void goalKeeper();
    void passTo(Robot& robot);
    void twist(double newOrientation);
};

#endif // ROBOT_H
